﻿@model BugTracker.Models.Project

@*@model IEnumerable<BugTracker.Models.Task>   *@
  
  @{  ViewBag.Title = "CreateProject";
      Layout = "~/Views/Shared/_LayoutAdmin.cshtml";
}

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.ui.datepicker.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery-ui-1.8.11.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.ui.datepicker.min.js")" type="text/javascript"></script>

<div id= "datePicker">
	<script type='text/javascript'>
	    $(document).ready(function () {
	        $(".datePicker").datepicker({
	            showAnim: 'slideDown',
	            currentText: 'Now',
	            
	            changeMonth: true,
	            changeYear: true,
	            showButtonPanel: true,
	            yearRange: '1900:2030'

	        });
	    });

</script>
</div>

<center>
@using (Html.BeginForm())
{
    @Html.ValidationSummary(true)
<center>
<fieldset>
<br />
         <div class="display-label"><b>Project Name:</b></div>
         <div class="editor-field">
            @Html.EditorFor(model => model.project_name)
            @Html.ValidationMessageFor(model => model.project_name)
        </div>

<br /> 
        <div class="display-label"><b>Task Assigned:</b></div>
        <br />
            @Html.DropDownListFor(model => model.task_assign,
            new SelectList(ViewData["Tasks"] as System.Collections.IEnumerable,
            "task_assignName ", "task_assignName "))
<br /> 
<br /> 
<br /> 
        <div class="display-label"><b>Assigned to: (Developer)</b></div>
<br />

           @Html.DropDownListFor(model => model.developer_assignID,
            new SelectList(ViewData["Developer"] as System.Collections.IEnumerable,
            "user_idPK", "last_name"))

<br /> 
<br />    
<br />  
        <div class="display-label"><b>Assigned to: (QA)</b></div>
<br />
            @Html.DropDownListFor(model => model.qa_assignID,
            new SelectList(ViewData["QA"] as System.Collections.IEnumerable,
           "user_idPK", "last_name"))

<br />
<br />
        <div class="display-label"><b>Descrpition:</b></div>
        <div class="editor-field">
            @Html.TextAreaFor(model => model.project_description, new { @style = "resize: none;", @cols = 50, @rows = 10 })
            @Html.ValidationMessageFor(model => model.project_description)
        </div>

<br />
        <div class="display-label"><b>Deadline:</b></div>
        <div class="datefield">
            @Html.EditorFor(model => model.project_deadline)
            @Html.ValidationMessageFor(model => model.project_deadline)
        </div>
<br />
       
        <div class="display-label"><b>Status:</b></div>
            @Html.DropDownListFor(model => model.status_id,
            new SelectList(ViewData["Status"] as System.Collections.IEnumerable,
            "status_id", "status_name"))
       

<br />
<br />
<br />


         <p>
            <input type="submit" value="Create Project" />
        </p>
<div>
    @Html.ActionLink("Back to Projects", "Project")
</div>
    
<br />
<br />
</fieldset> 
</center>
}
</center>